home *** CD-ROM | disk | FTP | other *** search
/ Compute! Gazette 1986 September / 1986-09.d64 / wizard demo (.txt) < prev    next >
Commodore BASIC  |  2022-09-20  |  5KB  |  113 lines

  1. 10 if te=0 then te=49152:load"window wizard",8,1
  2. 20 sys te:print"[147]";:!hue(6,6,14):fori=0to23
  3. 30 print"    window wizard     window wizard":next
  4. 40 print"    window wizard     window wizard[159]";:!restore
  5. 50 !def(1,0,1,0,32,50,50):!dim(4,20,19,15)
  6. 60 a$="welcome to the wonderful world of window wizard"+chr$(13)+chr$(13)
  7. 70 a$=a$+"[155]prepare to be bewildered and amazed by the power of your c-64...[159]"
  8. 80 a$=a$+chr$(13)+chr$(13)+" press the space  bar to continue "
  9. 90 !open,a$
  10. 100 gosub1110:!dim(8,3,30,10)
  11. 110 a$="with wizard, you can print any message (up to 255 characters) in a "
  12. 120 a$=a$+"magic window. and wait til you see what can be done with the window"
  13. 130 !open,a$
  14. 140 gosub1110:!def(1,0,10,102,32):!dim(14,12,25,9)
  15. 150 a$="[158]you can, for example, change either the color of the window or the"
  16. 160 a$=a$+" character used for the border of the window.[159]":!open,a$
  17. 170 gosub1110:!def(0,0,1,0,32,35,35):!dim(1,18,14,14)
  18. 180 a$="as you can hear, the printing can be done with or without sound."
  19. 190 !open,a$
  20. 200 gosub1110:!def(1,0,1,0,32,1,1):!dim(10,5,25,6)
  21. 210 a$="and you can vary the speed both for the window and the printing."
  22. 220 !open,a$
  23. 230 gosub1110:!def(1,1,1,0,32,25,25):!dim(2,2,24,10)
  24. 240 a$="notice the three dimensional effect of this window? that's just one "
  25. 250 a$=a$+"of the many effects at your command.":!open,a$
  26. 260 gosub1110:a$="and you can reuse a window whenever you wish...":!again,a$
  27. 270 gosub1110:!def(1,1,1,160,160,25,25):!dim(6,20,18,12)
  28. 280 a$="you can change the interior of the window, too.[146][159]":!open,a$
  29. 290 gosub1110:!def(1,0,0,0,32,5,50):!dim(0,0,40,25)
  30. 300 a$=chr$(13)+"and for the real kicker --"+chr$(13)+chr$(13)
  31. 310 a$=a$+"[159] very slowly now, press the space bar eight times "
  32. 320 a$=a$+"to step [155]backwards[159] through the windows.":!open,a$
  33. 330 for i=1 to 8
  34. 340 gosub1110
  35. 350 !close:nexti
  36. 360 !dim(6,15,22,12):!def(1,1,1,0,32,35,35)
  37. 370 a$="of course, there are many more commands available through window "
  38. 380 a$=a$+"wizard. for example, press the space bar to '!save' "
  39. 390 a$=a$+"the screen...":!open,a$
  40. 400 gosub1110:!save:a$="press it again to clear the screen...":!again,a$
  41. 410 gosub1110:print"[147]"
  42. 420 a$="and now press it once more to '!load' the screen we saved before...
  43. 430 !again,a$
  44. 440 [141]1110:![147]:[129] i[178]1[164]500:[130]
  45. 450 a$[178]"and we're right back where we started from..."
  46. 460 !again,a$:[129]i[178]1[164]2000:[130]:![160]
  47. 470 ![140]:![150](0,1,1,0,32,10,20):![134](4,4,22,12)
  48. 480 a$[178]"what are some of the other commands available?":![159],a$
  49. 490 [129]i[178]1[164]2000:[130]
  50. 500 a$[178]"well, you can use wizard's '!tone' command for you own purposes."
  51. 510 a$[178]a$[170][199](13)[170]"press the space bar to hear it (press listreturnopen to move on)
  52. 520 !again,a$
  53. 530 getk$:ifk$=""then530
  54. 540 ifk$=chr$(13) then570
  55. 550 ifk$<>chr$(32)then530
  56. 560 !tone,80:goto530
  57. 570 a$="and you have total scrolling of any area of the screen, as well."
  58. 580 a$=a$+"press the numbers 1 to 4 to see what i mean (or press [155]return[159] to"
  59. 590 a$=a$+" move on).":!again,a$
  60. 600 getk$:ifk$=""then600
  61. 610 ifk$=chr$(13)then660
  62. 620 ifk$<"1"ork$>"4"then600
  63. 630 k=val(k$)
  64. 640 t=12:if k/2=int(k/2) then t=22
  65. 650 fori=1tot:!scroll,k,1:forj=1to50:next:next:goto570
  66. 660 a$="[159]and the '!erase' command will erase any row you direct."+chr$(13)
  67. 670 a$=a$+"press a number key and we'll erase that row..."
  68. 680 a$=a$+" (or press [155]return[159] to move on)
  69. 690 !again,a$
  70. 700 k$[178]"":[161]k$:[139]k$[178]""[167]700
  71. 710 [139]k$[178][199](13)[167]740
  72. 720 [139]k$[179]"0"[176]k$[177]"9"[167]700
  73. 730 l[178][197](k$):!erase,l:[137]700
  74. 740 ![160]:![134](12,4,30,7)
  75. 750 a$[178]"and now we need to move our window down here to show you the next"
  76. 760 a$[178]a$[170]" wizard command...":![159],a$:[129]i[178]1[164]1500:[130]
  77. 770 a$[178]"let's clear the top of the screen with our '!erase' command..."
  78. 780 !again,a$:[129] i[178]0 [164] 11:!erase,i:[130]:[129]i[178]1[164]2000:[130]
  79. 790 a$[178]"and now we'll examine yet another command...":!again,a$
  80. 800 [129]i[178]1[164]2000:[130]:!center,3,"notice how"
  81. 810 !center,4,"these three lines are all":!center,5,"centered?"
  82. 820 a$[178]"it was done with wizard's '!center' command.":!again,a$
  83. 830 [129]i[178]1[164]3000:[130]:![160]:![140]:![134](0,1,38,5)
  84. 840 a$[178]"you may discover that wizard's '!box' command will come in handy..."
  85. 850 ![159],a$:[129]i[178]1[164]1500:[130]:![150](0,0,0,0,32,20,15):![134](7,1,18,10):!box
  86. 860 ![134](7,21,18,10):!box:![134](18,1,12,6):!box:![134](18,14,12,6):!box
  87. 870 ![134](18,27,12,6):!box:[129]i[178]1[164]2000:[130]:![160]:![140]
  88. 880 ![150](1,1,1,0,32,35,35):![134](1,20,19,8)
  89. 890 a$[178]"and you can use the '!kinetic' command to move windows...":![159],a$
  90. 900 [129]i[178]1[164]1500:[130]:[129]i[178]1[164]12:!kinetic(3,0,0):!kinetic(4,0,0):[130]
  91. 910 a$[178]"and, using the same command, you can control the size of any of "
  92. 920 a$[178]a$[170]"your magic windows...":!again,a$:[129]i[178]1[164]1500:[130]
  93. 930 [129]i[178]1[164]12:j[178]19[170]i:k[178]8[170]i:!kinetic(1,j,k):[130]:![134](10,5,30,9)
  94. 940 a$[178]"there are also commands like '!restore', '!print@', and '!display'."
  95. 950 a$[178]a$[170][199](13)[170][199](13)[170]"but the last one we'll demonstrate "
  96. 960 a$[178]a$[170]"is the '!menu' command. it's a handy one.":![159],a$
  97. 970 [129] i[178]1[164]1500:[130]:r$[178][199](13):m$[178]"     menu"[170]r$[170]r$
  98. 980 m$[178]m$[170]"1.  this is an"[170]r$:m$[178]m$[170]"2.  an example of"[170]r$[170]"3.  a window"[170]r$
  99. 990 m$[178]m$[170]"4.  generated"[170]r$[170]"5.  menu":m$[178]m$[170]r$[170]"6.  press a key"
  100. 1000 ![150](1,1,0,0,32,10,30):![134](5,16,22,11):!menu,m$,k$:![134](16,5,35,6)
  101. 1010 ![150](1,1,1,0,32,10,10)
  102. 1020 a$[178]"you just pressed the '"[170]k$[170]"' key."[170][199](13)
  103. 1030 [139]k$[179]"1"[176]k$[177]"6"[167]a$[178]a$[170]"that wasn't even on the menu"
  104. 1040 ![159],a$:[129]i[178]1[164]2000:[130]:![134](3,1,20,20)
  105. 1050 a$[178]"listsys 49152open acts as a toggle switch. if wizard is off, it will "
  106. 1060 a$[178]a$[170]"turn it on and if wizard is on, it will turn it off."[170]r$[170]r$
  107. 1070 a$[178]a$[170]"tapping listrestoreopen will give you a full page review of all 19 of "
  108. 1080 a$[178]a$[170]"wizard's commands"[170]r$[170]r$
  109. 1090 a$[178]a$[170]"listpress the space bar to end this demonstration.open":![159],a$
  110. 1100 [141]1110:[153]"load":[128]
  111. 1110 k$[178]"":[161]k$:[139]k$[178]""[167]1110
  112. 1120 [142]
  113.